class CreateProducts < ActiveRecord::Migration
  def self.up
    create_table :products do |t|
      t.integer :national_id
      t.integer :farm_id
      t.string :level
      t.text :desc1
      t.text :desc2
      t.integer :body
      t.integer :acidity
      t.string :product_yrs
      t.string :image_url
      t.decimal :p200, :precision => 8, :scale =>0, :default =>0
      t.decimal :p500, :precision => 8, :scale =>0, :default =>0
      t.decimal :p1000, :precision => 8, :scale =>0, :default =>0
      t.decimal :p6m200, :precision => 8, :scale =>0, :default =>0
      t.decimal :p6m500, :precision => 8, :scale =>0, :default =>0
      t.decimal :p6m1000, :precision => 8, :scale =>0, :default =>0
      t.decimal :p12m200, :precision => 8, :scale =>0, :default =>0
      t.decimal :p12m500, :precision => 8, :scale =>0, :default =>0
      t.decimal :p12m1000, :precision => 8, :scale =>0, :default =>0

      t.timestamps
    end
  end

  def self.down
    drop_table :products
  end
end
